package com.caipu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.caipu.dto.DishDetailDTO;
import com.caipu.entity.UserFavorite;

import java.util.List;

public interface UserFavoriteService extends IService<UserFavorite> {
    
    /**
     * 添加收藏
     */
    boolean addFavorite(Long userId, Long dishId);
    
    /**
     * 取消收藏
     */
    boolean removeFavorite(Long userId, Long dishId);
    
    /**
     * 检查是否已收藏
     */
    boolean isFavorite(Long userId, Long dishId);
    
    /**
     * 获取用户收藏的菜品列表
     */
    Page<DishDetailDTO> getFavoriteDishesByUser(Long userId, int page, int size);
    
    /**
     * 获取用户收藏的菜品ID列表
     */
    List<Long> getFavoriteDishIds(Long userId);
}